package cn.changeforyou.web.plugin.page.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @md-config
 * @author zhyu
 * @date 2021/2/26 9:42
 */
@Component
@ConfigurationProperties(prefix = "page")
@Data
public class PageProperties {

    final static String PAGE_NUMBER_N = "pageNumber";
    final static String PAGE_SIZE_N = "pageSize";
    
    /**
     * 默认分页起始页
     */
    private Integer pageNumber = 1;
    /**
     * 默认分页一页多少数据
     */
    private Integer pageSize = 10;
    /**
     * 默认分页参数解析拦截器自动拦截的接口url
     */
    private String pageUrl = "/*/*List";
    /**
     * 默认分页参数名
     */
    private String pageNumberName = PAGE_NUMBER_N;
    /**
     * 默认分页参数名
     */
    private String pageSizeName = PAGE_SIZE_N;
}
